home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
ctutord.EXE
/
19A.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-17
|
434b
|
21 lines
/*
There may be additional include files required depending
upon the compile product you are using. Typical compilers
include Microsoft C by Microsoft or Turbo C by Boland Int'l.
*/
#include <stdio.h>
main()
{
int x = 15, y = 20;
printf("Before swap\n");
printf("x is %d, y is %d\n", x, y);
x = x^y; /* swap x and y */
y = y^x;
x = x^y;
printf("x is %d, y is %d\n", x, y);
printf("After swap\n");
}